﻿/*
 * @Description:清洗工具中清洗查看结果js
 * @Author:yangpl
 * @Date:2014-10-23
 */

var pageCleanResult = {};
pageCleanResult.init = function () {
    var option = {
        titleID: "titleid",
        contentID: "contentdiv",
        currentClassName: "current",
        isIframe: true,
        titleFun: pageCleanResult.getTitles,
        urlFun: pageCleanResult.getTabUrl,
        dataFun: pageCleanResult.getData,
        contentFun: null
    };
    tabHelper(option);
    $("#btnRefreshContrast").click(function() {
        window.location.reload();
    });
};

pageCleanResult.getTitles = function () {
    return ["栋座对比结果", "房号对比结果"];
};

pageCleanResult.getTabUrl = function (tabname) {
    var urlNum = window.location.href.split('?')[1];
    if (tabname == "栋座对比结果") {
        ///estate/find-estate-clean-for-view?EstateKeyId=e3efbe96-16da-4692-b450-d5b97511fd05&EstateName=%e6%9f%8f%e4%b8%bd%e8%8a%b1%e5%9b%ad
        return "/estate/find-estate-clean-result?IsBuildingDifferent=true&DifferentType=1&" + urlNum;
    }
    if (tabname == "房号对比结果") {
        return "/estate/find-estate-clean-result?IsBuildingDifferent=false&DifferentType=1&" + urlNum;
    }

};

pageCleanResult.getData = function (tabname) {
    if (tabname != "栋座") {
        return null;
    } else {
        return [{ name: "key", value: tabname }];
    }
};